package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2024-11-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@TableName("t_freight_temp_zone_price")
public class FreightTempZonePriceDo extends Model<FreightTempZonePriceDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

//    @TableField("zone_temp_rule_id")
//    private Long zoneTempRuleId;
    @TableField("zone")
    private String zone;

    @TableField("zone_price")
    private Double zonePrice;

    @TableField("freight_temp_weight_id")
    private Long freightTempWeightId;

    @TableField("temp_id")
    private Long tempId;

    @TableField("addr_type")
    private Integer addrType;


    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField("create_time")
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;

    /**
     * 类型 freight_temp 物流费模板  freight 物流费  surcharge 附加费
     */
    @TableField("price_type")
    private String priceType;

    public FreightTempZonePriceDo(String zone, Double zonePrice, Long freightTempWeightId, Long tempId, Integer addrType, String priceType) {
        this.zone = zone;
        this.zonePrice = zonePrice;
        this.freightTempWeightId = freightTempWeightId;
        this.tempId = tempId;
        this.addrType = addrType;
        this.priceType = priceType;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
